home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
edit
/
njs30exe.zip
/
NJSTAR3.DOC
< prev
next >
Wrap
Text File
|
1994-02-15
|
47KB
|
955 lines
(This is the third part of NJSTAR USER'S MANUAL. Read NJSTAR2.DOC first)
=============================================================================
14. FILE CONVERSION
===================
This section describes several file conversion options provided by NJStar.
All items listed here can be found under "Output" (╩Σ│÷ ╫¬╗╗) in the main
menu.
NJSTAR uses the GB (Guo Biao ╣·▒Ω) coding standard. All other formats need
some kind of conversion. NJSTAR provides the following commands to handle
Big5, Hz and Zw coding.
FUNCTION <ReadBig5> [Ctrl+X+B] ╢┴┤≤╬σ┬δ Read Big5
This command reads a Big5 file into memory and converts it into GB, so that
a Big5 file can be edited in NJSTAR.
BIG5 is a de facto standard for un-simplified Chinese characters widely used
in Taiwan and Hong Kong. The Big5 standard is also supported by Microsoft
Chinese Windows. The Big5 coding scheme includes 13,000 un-simplified
Chinese characters.
See PROGRAM USAGE in this manual for the '-b' option on the command line.
NJStar recognizes if the current file is a Big5 file after it is loaded with
the '-b' command line option. However, when saving the file with <SaveFile>
or <File>, it will save the file in GB format. To save the file in Big5
format, use the <SaveBig5> function as described below:
FUNCTION <SaveBig5> [Ctrl+X+^B] ┤µ┤≤╬σ┬δ Save Big5
Saves the current file to disk in Big5 format. The file can then be imported
into any Big5 System, such as ETen, KC and Microsoft Chinese Windows. NJSTAR
converts GB to Big5 intelligently. It solves the problem of one GB character
to many Big5 character mapping by using artificial intelligence. The
conversion is NOT 100% perfect. If you are going to publish it in a Big5
system, you are advised to check it carefully beforehand. If you find a
conversion error, please inform the author, so that conversion accuracy can
be improved in the next version.
FUNCTION <zWEditFile> ╢┴zW╬─╝■
This function has been removed from V3.0. The same result can be achieved by
using <EditFile> + <zWDecode>.
The zW format was initially proposed by Yagui Wei and Ed Lai, for the
purpose of transferring GB files via mainframe networks in ASCII mode. GB
files use extended ASCII characters for internal coding. These characters
cannot be transferred in ASCII mode, say, as an e-mail message, via
mainframe networks. Therefore, one of possible ways to transfer those files
in ASCII format is to use one of the popular UUENCODE.EXE or UUENCODE.COM
programs. But an unencoded file has a great amount of overhead data so that
the resultant file size is much bigger, 33.33% larger than the original
file. The zW format uses smaller overhead data, yet the resultant file can
be transferred in ASCII format. There are some zW viewers available for PC
computers, so that users can read directly a Chinese message in zW format.
In a zW file:
1) Each line starts with a string of "zW," with a max length of 78
characters;
2) Codes for Chinese characters (ASCII 161-254) are masked with
the high bit off, that is, shifted by 128 in decimal value;
3) The End of Line character is preceded with a "#" character;
4) All other ASCII characters are preceded with a blank character.
For example, the following Chinese line
─╧╝½╨╟(NJSTAR)╩╟╬╥╧▓░«╡─╓╨╬─╬─╩Θ┤ª└φ╧╡═│.
will be encoded in Zw format as
zW DO<+PG ( N J S T A R )JGNRO20.5DVPNDNDJi4&@mO5M3 .#
Please see PROGRAM USAGE in this manual for the '-zW' option at the command
line.
NJStar will recognize if the current file is a zW file after it is loaded
with the '-zW' Command line option. When the file is later saved, it will be
in zW format. To change the format to GB, users need to use <SaveAs> to save
it with another file name.
FUNCTION <zWDecode> [Shift+F7] ╥δzW╬─╝■ zW Decode
Converts a zW file in the NJSTAR buffer to GB format.
If a zW format file is loaded without the <zWEditFile> command, NJStar will
simply handle it as a GB file without Chinese characters. This function can
thus be used to decode the current zW file to GB format. After that, the
file will be saved in GB format.
FUNCTION <zWSaveFile> [Shift+F6] ┤µzW╬─╝■ zW SaveFile
Encodes the current file in zW format and saves the result to disk with a
user specified file name. When prompted, you can enter a file name
(recommend a '.zw' extension), with drive name and full path if necessary.
NJStar will ask the user to confirm the file name if it exists.
Since the resultant file is in zW format, you can send the file through the
mainframe network in ASCII mode.
FUNCTION <HzEditFile> [Shift+F4] ╢┴Hz╬─╝■ Hz EditFile
Loads a file in Hz format, and then decodes it for display in Chinese.
Hz format, proposed collectively and finalized by Fung F. Lee, is another
format dedicated for transferring Chinese files via a computer network.
Generally, it uses less overhead data than zW format in conversion, and
covers more loopholes in zW format.
Hz format keeps the original hard line setting. Thus, a line is divided into
different segment, grouped by the following four types of data. The
following coding schemes and the identifiers are applied to different types
of data:
ASCII CODE ENCODING HZ Format
============= =========== ==========
c = 0 - 31 C = c + 32 ~(C~)
c = 32 - 127 C = c C (no identifier)
c = 128 - 160 C = c - 96 ~[C~]
c = 161 - 254 C = c - 128 ~{C~}
For example, the following Chinese line
─╧╝½╨╟(NJSTAR)╩╟╬╥╧▓░«╡─╓╨╬─╬─╩Θ┤ª└φ╧╡═│.
will be encoded in Hz format as
~{DO<+PG~}(NJSTAR)~{JGNRO20.5DVPNDNDJi4&@mO5M3~}.
NJStar will remember that the current file is a Hz file after it is loaded
with this command or with the '-Hz' command line option. When saving the
file, it will be in the Hz format. To change the format to GB, use the
<SaveAs> function to save it with another name.
Please see PROGRAM USAGE in this manual for the '-Hz' option on the command
line.
FUNCTION <HzDecode> [Shift+F3] ╥δHz╬─╝■ Hz Decode
Converts a Hz file in NJSTAR buffer to GB format.
If a Hz format file is loaded without using the <HzEditFile> command, NJStar
will simply handle it as a GB file without Chinese characters. Thus, this
function can be used to decode the current Hz file into GB format; the file
will be saved in GB format.
FUNCTION <HzSaveFile> [Shift+F2] ┤µHz╬─╝■ Hz Savefile
Encodes the current file in Hz format and saves the results to disk with a
user specified file name. When prompted, enter a file name (recommended:
'.hz' extension), with drive name and full path if necessary. NJStar will
ask to confirm the file name if it exists.
As mentioned above, the Hz format does not change the original line length.
This could cause some problems with ASCII transfer over computer networks.
Thus, when a resultant line is longer than 79 characters, NJStar adds a
"soft return" mark as the 79th character and then wraps the line to the next
line. The "soft return" mark is a [~] followed by a hard return (LF CR).
Since the resultant file is in Hz format, users may send the file in the
mainframe network in ASCII mode.
FUNCTION <PcxSaveFile> [Shift+F5] ╩Σ│÷ PCX Create PCX
Creates a set of PCX files (one file per page) from the current file. The
purpose of this function is mainly to help users to send a GB file via
computerized fax equipment.
A GB file normally is not supported by fax software. But PCX is a popular
graphic format, supported by many fax software packages. This function can
be used to convert the current file to PCX files, to be sent